﻿using MvvmToolkit.ViewModels;
using Chess.Client.Model;

namespace Chess.Client.ViewModel
{
    internal class ClientViewModel : ViewModelBase
    {
        public ClientViewModel(ClientModel modelModel)
        {
            _clientModelModel = modelModel;
        }

        private ClientModel _clientModelModel;

        public string IpAddress
        {
            get { return _clientModelModel.IpAddress; }
            set
            {
                _clientModelModel.IpAddress = value;
                OnPropertyChanged("IpAddress");
            }
        }

        public string Name
        {
            get { return _clientModelModel.Name; }
            set
            {
                _clientModelModel.Name = value;
                OnPropertyChanged("Name");
            }
        }

        public int Port
        {
            get { return _clientModelModel.Port; }
            set
            {
                _clientModelModel.Port = value;
                OnPropertyChanged("Port");
            }
        }

        public bool Loggined
        {
            get { return _clientModelModel.Loggined; }
            set
            {
                _clientModelModel.Loggined = value;
                OnPropertyChanged("Loggined");
            }
        }
    }
}
